<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/pages/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>广东工业大学招生办后台管理</title>
<link rel="stylesheet" href="${ctx }/kindeditor/themes/default/default.css" />
<script charset="utf-8" src="${ctx }/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="${ctx }/kindeditor/lang/zh_CN.js"></script>

<script>
	var editor;
	KindEditor.ready(function(K) {
		editor = K.create('textarea[name="entity.introduce"]', {
			cssPath : '${ctx}/kindeditor/plugins/code/prettify.css',
				uploadJson :  '${ctx}/kindeditor/jsp/upload_json.jsp',  
				fileManagerJson : '${ctx}/kindeditor/jsp/file_manager_json.jsp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						document.forms['article'].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						document.forms['article'].submit();
					});
				}
			});
			prettyPrint();
		});
	function check(){
	var title=document.getElementById("title");
	if(title.value==""){
	alert("学院名称不能为空！");
		return false;
		}
		if(editor.isEmpty()){
			alert("介绍不能为空！");
			return false;
		}
		return  true;
	}
</script>

</head>

<body>
	<div class="article">
		<form action="academy-admin!save.action" method="post" onsubmit="return check()" name="article">
		
			<table style="width:100%">
				<tr>
					<td align="right">学院名称：</td>
					<td style="font-size:28px;text-align:center">
						<input type="text"  name="entity.name" value="${entity.name}" id="title" style="width:100%" />
					</td>
				</tr>

				<tr>
					<td align="right">介绍：</td>
					<td>

						<textarea name="entity.introduce" style="width:100%;height:400px;visibility:hidden;">${entity.introduce }</textarea>
					</td>
				</tr>
				<tr>
					<td></td>
					<td align="right" >
						<input type="submit" class="button" value="提交" style="width:80px;" /> 
					</td>
				</tr>
			</table>
				
				


		</form>
	</div>
</body>
</html>
